package com.cubeofnine.sugar.service.element;

import java.util.HashMap;
import java.util.Map;

public class EntryResult {
	private Map<Object, Field> fieldList = new HashMap<Object, Field>();
	private Map<Object, EntryValue> entryList = new HashMap<Object, EntryValue>();
	private ErrorValue error = new ErrorValue();

	public EntryResult() {

	}

	public EntryResult(Map<Object, Field> fieldList,
			Map<Object, EntryValue> entryList, ErrorValue error) {
		this.fieldList = fieldList;
		this.entryList = entryList;
		this.error = error;
	}

	public Map<Object, Field> getFieldList() {
		return fieldList;
	}

	public void setFieldList(Map<Object, Field> fieldList) {
		this.fieldList = fieldList;
	}

	public void addField(Object key, Field value) {
		fieldList.put(key, value);
	}

	public Map<Object, EntryValue> getEntryList() {
		return entryList;
	}

	public void setEntryList(Map<Object, EntryValue> entryList) {
		this.entryList = entryList;
	}

	public void addEntry(Object key, EntryValue value) {
		entryList.put(key, value);
	}

	public ErrorValue getError() {
		return error;
	}

	public void setError(ErrorValue error) {
		this.error = error;
	}

	@Override
	public String toString() {
		return "EntryResult [fieldList=" + fieldList + ", entryList="
				+ entryList + ", error=" + error + "]";
	}

}
